function MakeupMain(){
	this.make=function(){
		var _mak=new MakeupMenu();
		_mak.makeupMenu();
		_mak.right0();
		//_mak.right1();
		var _shop=new ShopMain();
		_shop.shoping();
	}
	
}

function MakeupMenu(){
	this.makeupMenue=document.getElementById("menue");
	var _this=this;
	this.div1=null;
	this.div2=null;
	this.div3=null;
	this.div4=null;
	this.ul=null;
	this.li0=null;
	this.a0=null;
	
	this.li1=null;
	this.a1=null;
	
	this.li2=null;
	this.a2=null;
	
	this.li3=null;
	this.a3=null;
	
	this.li4=null;
	this.a4=null;
	
	this.li5=null;
	this.a5=null;
	
	this.li6=null;
	this.a6=null;
	
	this.li7=null;
	this.a7=null;
	
	this.li8=null;
	this.a8=null;
	
	this.li9=null;
	this.a9=null;
	this.makeupMenu=function(){
		$.get("js/makeup.json",null,function(data,textStatus){
			if(textStatus=="success"){
				for(_this.i=0;_this.i<10;_this.i++){
					_this.div1=document.createElement("div");
					_this.div1.className="colos";
					_this.div2=document.createElement("div");
					_this.div2.className="menuLeft";
					_this.div1.appendChild(_this.div2);
					_this.div2.innerHTML=data["h10"]["txt"+_this.i]["shop"];
					_this.ul=document.createElement("ul");
					_this.ul.className="menuRight me"+_this.i;
					_this.div1.appendChild(_this.ul);
					_this.div3=document.createElement("div");
					_this.div3.className="clear";
					_this.div1.appendChild(_this.div3);
					_this.div4=document.createElement("div");
					_this.div4.className="clear";
					_this.ul.appendChild(_this.div4);
					_this.makeupMenue.appendChild(_this.div1);
				}
				
				
			}
		},"json");
	}
	_this.right0=function(){
		$.get("js/makeup.json",null,function(data,textStatus){
			if(textStatus=="success"){
				for(_this.i0=0;_this.i0<33;_this.i0++){
					_this.li0=document.createElement("li");
					_this.li0.className="menuli";
					_this.a0=document.createElement("a");
					_this.a0.href=data["h0"]["txt"+_this.i0]["url"];
					_this.a0.target="_blank";
					_this.li0.appendChild(_this.a0);
					$(".me0").append(_this.li0);
					_this.a0.innerHTML=data["h0"]["txt"+_this.i0]["shop"];
				}
				for(_this.i1=0;_this.i1<11;_this.i1++){
					_this.li1=document.createElement("li");
					_this.li1.className="menuli";
					_this.a1=document.createElement("a");
					_this.a1.href=data["h1"]["txt"+_this.i1]["url"];
					_this.a1.target="_blank";
					_this.li1.appendChild(_this.a1);
					$(".me1").append(_this.li1);
					_this.a1.innerHTML=data["h1"]["txt"+_this.i1]["shop"];
				}
				for(_this.i2=0;_this.i2<5;_this.i2++){
					_this.li2=document.createElement("li");
					_this.li2.className="menuli";
					_this.a2=document.createElement("a");
					_this.a2.href=data["h2"]["txt"+_this.i2]["url"];
					_this.a2.target="_blank";
					_this.li2.appendChild(_this.a2);
					$(".me2").append(_this.li2);
					_this.a2.innerHTML=data["h2"]["txt"+_this.i2]["shop"];
				}
				for(_this.i3=0;_this.i3<8;_this.i3++){
					_this.li3=document.createElement("li");
					_this.li3.className="menuli";
					_this.a3=document.createElement("a");
					_this.a3.href=data["h3"]["txt"+_this.i3]["url"];
					_this.a3.target="_blank";
					_this.li3.appendChild(_this.a3);
					$(".me3").append(_this.li3);
					_this.a3.innerHTML=data["h3"]["txt"+_this.i3]["shop"];
				}
				for(_this.i4=0;_this.i4<16;_this.i4++){
					_this.li4=document.createElement("li");
					_this.li4.className="menuli";
					_this.a4=document.createElement("a");
					_this.a4.href=data["h4"]["txt"+_this.i4]["url"];
					_this.a4.target="_blank";
					_this.li4.appendChild(_this.a4);
					$(".me4").append(_this.li4);
					_this.a4.innerHTML=data["h4"]["txt"+_this.i4]["shop"];
				}
				for(_this.i5=0;_this.i5<4;_this.i5++){
					_this.li5=document.createElement("li");
					_this.li5.className="menuli";
					_this.a5=document.createElement("a");
					_this.a5.href=data["h5"]["txt"+_this.i5]["url"];
					_this.a5.target="_blank";
					_this.li5.appendChild(_this.a5);
					$(".me5").append(_this.li5);
					_this.a5.innerHTML=data["h5"]["txt"+_this.i5]["shop"];
				}
				for(_this.i6=0;_this.i6<11;_this.i6++){
					_this.li6=document.createElement("li");
					_this.li6.className="menuli";
					_this.a6=document.createElement("a");
					_this.a6.href=data["h6"]["txt"+_this.i6]["url"];
					_this.a6.target="_blank";
					_this.li6.appendChild(_this.a6);
					$(".me6").append(_this.li6);
					_this.a6.innerHTML=data["h6"]["txt"+_this.i6]["shop"];
				}
				for(_this.i7=0;_this.i7<9;_this.i7++){
					_this.li7=document.createElement("li");
					_this.li7.className="menuli";
					_this.a7=document.createElement("a");
					_this.a7.href=data["h7"]["txt"+_this.i7]["url"];
					_this.a7.target="_blank";
					_this.li7.appendChild(_this.a7);
					$(".me7").append(_this.li7);
					_this.a7.innerHTML=data["h7"]["txt"+_this.i7]["shop"];
				}
				for(_this.i8=0;_this.i8<3;_this.i8++){
					_this.li8=document.createElement("li");
					_this.li8.className="menuli";
					_this.a8=document.createElement("a");
					_this.a8.href=data["h8"]["txt"+_this.i8]["url"];
					_this.a8.target="_blank";
					_this.li8.appendChild(_this.a8);
					$(".me8").append(_this.li8);
					_this.a8.innerHTML=data["h8"]["txt"+_this.i8]["shop"];
				}
				for(_this.i9=0;_this.i9<5;_this.i9++){
					_this.li9=document.createElement("li");
					_this.li9.className="menuli";
					_this.a9=document.createElement("a");
					_this.a9.href=data["h9"]["txt"+_this.i9]["url"];
					_this.li9.appendChild(_this.a9);
					$(".me9").append(_this.li9);
					_this.a9.innerHTML=data["h9"]["txt"+_this.i9]["shop"];
				}
			}
		},"json")
	}
}

function ShopMain(){
	this.shopmain=document.getElementById("mains");
	this.div1=null;
	this.div2=null;
	this.div3=null;
	this.div4=null;
	this.div5=null;
	this.img1=null;
	this.img2=null;
	this.img3=null;
	this.img4=null;
	this.img5=null;
	this.img6=null;
	this.span1=null;
	this.span2=null;
	this.span3=null;
	this.span4=null;
	this.span5=null;
	this.span6=null;
	this.span7=null;
	this.a1=null;
	this.a2=null;
	this.a3=null;
	this.a4=null;
	this.a5=null;
	this.inputs=null;
	var _this=this;
	this.shoping=function(){
		$.get("js/makeupMain.json",null,function(data,textStatus){
			if(textStatus=="success"){
				for(_this.i=0;_this.i<48;_this.i++){
					_this.div1=document.createElement("div");//添加大盒子
					_this.div1.className="mainShop";
					_this.shopmain.appendChild(_this.div1);
					//console.log(data["next0"]["shop"+_this.i]);
					_this.a1=document.createElement("a");//商品大图片
					_this.a1.className="shopImg";
					_this.a1.href=data["next0"]["shop"+_this.i]["url"];
					_this.a1.title=data["next0"]["shop"+_this.i]["title"];
					_this.img1=document.createElement("img");
					_this.img1.src=data["next0"]["shop"+_this.i]["img"];
					_this.img1.alt=""
					_this.a1.appendChild(_this.img1);
					_this.div1.appendChild(_this.a1);
					_this.div2=document.createElement("div");//价格盒子
					_this.div2.className="price";
					_this.div1.appendChild(_this.div2);
					_this.span3=document.createElement("span");
					_this.span3.className="prim";
					_this.span3.innerHTML="￥";
					_this.div2.appendChild(_this.span3);
					_this.span1=document.createElement("span");
					_this.span1.className="pri";
					_this.span1.innerHTML=data["next0"]["shop"+_this.i]["price"];
					_this.div2.appendChild(_this.span1);
					_this.span4=document.createElement("span");
					_this.span4.className="costm";
					_this.span4.innerHTML="￥";
					_this.div2.appendChild(_this.span4);
					_this.span2=document.createElement("span");
					_this.span2.className="cost";
					_this.span2.innerHTML=data["next0"]["shop"+_this.i]["cost"];
					_this.div2.appendChild(_this.span2);
					_this.img2=document.createElement("img");
					_this.img2.className="priImg";
					_this.img2.src=data["next0"]["shop"+_this.i]["rapidly"];
					_this.img2.alt="";
					_this.div2.appendChild(_this.img2);
					_this.a2=document.createElement("a");
					_this.a2.className="product";
					_this.a2.href=data["next0"]["shop"+_this.i]["url"];
					_this.a2.title=data["next0"]["shop"+_this.i]["title"];
					_this.div1.appendChild(_this.a2);
					_this.span5=document.createElement("span");
					_this.span5.innerHTML=data["next0"]["shop"+_this.i]["txt1"];
					_this.span6=document.createElement("span");
					_this.span6.className="rep";
					_this.span6.innerHTML=data["next0"]["shop"+_this.i]["txt2"];
					_this.a2.appendChild(_this.span5);
					_this.a2.appendChild(_this.span6);
					_this.div3=document.createElement("div");//添加评论
					_this.div3.className="discuss";
					_this.div1.appendChild(_this.div3);
					_this.img3=document.createElement("img");
					_this.img3.src=data["next0"]["shop"+_this.i]["discussimg"];
					_this.div3.appendChild(_this.img3);
					_this.a3=document.createElement("a");
					_this.a3.href=data["next0"]["shop"+_this.i]["url"];
					_this.a3.innerHTML=data["next0"]["shop"+_this.i]["discuss"];
					_this.div3.appendChild(_this.a3);
					_this.div4=document.createElement("div");//添加购物车
					_this.div4.className="car";
					_this.div1.appendChild(_this.div4);
					_this.inputs=document.createElement("input");
					_this.inputs.type="txet";
					_this.inputs.value="1";
					_this.div4.appendChild(_this.inputs);
					_this.div5=document.createElement("div");
					_this.div5.className="up";
					_this.div4.appendChild(_this.div5);
					_this.img4=document.createElement("img");
					_this.img4.src="img/makeup/152.gif";
					_this.div5.appendChild(_this.img4);
					_this.img5=document.createElement("img");
					_this.img5.src="img/makeup/151.gif";
					_this.div5.appendChild(_this.img5);
					_this.a4=document.createElement("a");
					_this.a4.href="#";
					_this.a4.className="addShop";
					_this.div4.appendChild(_this.a4);
					_this.img6=document.createElement("img");
					_this.img6.src=data["next0"]["shop"+_this.i]["add"];
					_this.a4.appendChild(_this.img6);
				}
			}
		},"json")
	}
}
